package com.scalar.chiptrack.operations.dataentry.inventoryReceive.forms;

import com.scalar.chiptrack.operations.dataentry.LotDetails;
import com.scalar.chiptrack.operations.dataentry.InTransitLots;
import com.scalar.chiptrack.operations.dataentry.test.TestBinInfo;
import com.scalar.chiptrack.ChipTrackActionForm;
import com.scalar.chiptrack.utils.AutoGrowingArrayList;
import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: ChandraSekhar
 * Date: Fed 06, 2008
 * Time: 12:28:08 PM
 */
public class InventoryReceiveForm extends ChipTrackActionForm
{
    private String processType      = null;
    private String baseprocessType      = null;
    private int processStepId    = -1;
    private int locationId       = -1;
    private int lotId         = -1;
    private String fabLotNo         = null;

    private LotDetails invLotDetails;

    ArrayList transitLotsList = new AutoGrowingArrayList(InTransitLots.class);
    ArrayList confirmedTransitLotsList = new AutoGrowingArrayList(InTransitLots.class);

    public int getProcessStepId() {
        return processStepId;
    }

    public void setProcessStepId(int processStepId) {
        this.processStepId = processStepId;
    }

    public int getLocationId() {
        return locationId;
    }

    public void setLocationId(int locationId) {
        this.locationId = locationId;
    }

    public int getLotId() {
        return lotId;
    }

    public void setLotId(int lotId) {
        this.lotId = lotId;
    }

    public ArrayList getConfirmedTransitLotsList() {
        return confirmedTransitLotsList;
    }

    public void setConfirmedTransitLotsList(ArrayList confirmedTransitLotsList) {
        this.confirmedTransitLotsList = confirmedTransitLotsList;
    }

    public LotDetails getInvLotDetails() {
        return invLotDetails;
    }

    public void setInvLotDetails(LotDetails invLotDetails) {
        this.invLotDetails = invLotDetails;
    }

    public String getProcessType() {
        return processType;
    }

    public void setProcessType(String processType) {
        this.processType = processType;
    }

    public String getBaseprocessType() {
        return baseprocessType;
    }

    public void setBaseprocessType(String baseprocessType) {
        this.baseprocessType = baseprocessType;
    }

    public String getFabLotNo() {
        return fabLotNo;
    }

    public void setFabLotNo(String fabLotNo) {
        this.fabLotNo = fabLotNo;
    }

    public ArrayList getTransitLotsList() {
        return transitLotsList;
    }

    public void setTransitLotsList(ArrayList transitLotsList) {
        this.transitLotsList = transitLotsList;
    }

    public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest)
    {
        if( transitLotsList != null )
        {
           for(int i=0; i< transitLotsList.size(); i++ )
           {
               InTransitLots inTransitLots = ( InTransitLots)transitLotsList.get(i);

               inTransitLots.setChecked( false );

           }
        }
    }
}
